<ui:composition template="/WEB-INF/templates/defaultLayout.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	<ui:define name="title">
		#{lang.getTrans("ui.mobile.customer.title")} 
	</ui:define>

	<ui:define name="layoutCenter">
		<h:form>
			<p:growl id="growl"/>
			<p:breadCrumb>
				<p:menuitem value="#{lang.getTrans('ui.mobile.common.bread.home')}" url="/home.xhtml"/>
				<p:menuitem value="#{lang.getTrans('ui.mobile.common.bread.customer')}" url="/crud/customer/customerList.xhtml"/>
				<p:menuitem value="#{lang.getTrans('ui.mobile.common.bread.editar')}" url="/crud/customer/customerForm.xhtml"/>
			</p:breadCrumb>
			<p:panel id="panel" header="Cadastro de Clientes">
				<ui:include src="/WEB-INF/elements/formCustomer.xhtml" />			
			</p:panel>
			<p:blockUI block="panel" trigger="btSub"/>
			<p:panel style="text-align:center">
				<h:inputHidden id="idCustomer" value="#{customerBean.customer.idCustomer}" />
				<h:inputHidden id="nrVersion" value="#{customerBean.customer.nrVersion}" />	
				<p:commandButton id="btSub" value="#{lang.getTrans('ui.mobile.common.save')}"
					type="submit" action="#{customerBean.adicionar}" update="growl"/>
				<p:button value="#{lang.getTrans('ui.mobile.common.cancel')}" outcome="customerList" />
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>
